var http = require('http');
var path = require("path");
var fs = require('fs');

http.createServer((req,res)=>{
    var filePath = path.join(__dirname,"data.txt");
    var readStream = fs.createReadStream(filePath);
    readStream.pipe(res);
}).listen(8081)
console.log("server is listening")